package com.kldy8.kldyw.bean;

import org.json.JSONObject;

/**
 * Created by user on 2017/1/18.
 */

public class Version
{
    private int status;
    private String platform;
    private String version_code;
    private String version_name;
    private String source;

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getPlatform() {
        return platform;
    }

    public void setPlatform(String platform) {
        this.platform = platform;
    }

    public String getVersion_code() {
        return version_code;
    }

    public void setVersion_code(String version_code) {
        this.version_code = version_code;
    }

    public String getVersion_name() {
        return version_name;
    }

    public void setVersion_name(String version_name) {
        this.version_name = version_name;
    }

    public String getSource() {
        return source;
    }

    public void setSource(String source) {
        this.source = source;
    }



    public static Version resolution(JSONObject jsonObject)
    {
        if (jsonObject == null)
        {
            return  null;
        }
        Version m_version = new Version();
        m_version.status = jsonObject.optInt("status");
        m_version.platform = jsonObject.optString("platform");
        m_version.version_code = jsonObject.optString("version_code");
        m_version.version_name = jsonObject.optString("version_name");
        m_version.source = jsonObject.optString("source");
        return m_version;
    }
}
